
function quest(){
	$arr= new Array()
	$dbnum=$('.title').children('p').length;
	$n=0;
	$i=1;	
	begin()	;
}
function begin(){
	on(".title p",$n);
	on(".fomr ul",$n);
	$num=$i+"/"+$dbnum;
	$('.fomr ul li').click(function(){
		$(this).addClass("cli");//单击某个标题，添加cli类
		$(this).siblings().removeClass("cli"); //同辈元素移除cli类	
	});
	$('.num').text($num);
	dian();
}
function dian(){
	$dbnum=$('.title').children('p').length;
	$("."+$i+"").click(function(){
			$v=$(".u"+$i+" .cli").attr('db');
			if($v==undefined){
				alert("请选择一项吧！");
				return false;
			}
			
			$arr[$n]=$v;
			if($i==$dbnum){
				$url="/index.php/Research/an?arr="+$arr;
				$data='{"id":1234567890123456,"firstName":"jordan","lastName","john","question1":"0","question2":"1","question3":"2" ,"question4":"3","question5":"4","sex":"男"}';
				// $url="/dome/dome.html?data="+$data;
					window.location.href=$url; 
				
			}else{
			$n++;
			$i++;
			}
		begin();
	})
}

function on(calss,i){
	$(""+calss+"").hide();
	$(""+calss+"").eq(i).show();
}
